import { defineConfig } from "unocss";
import presetUno from "unocss/preset-uno";

export default defineConfig({
    presets: [presetUno()],
    rules: [
        [
            "flex-center",
            {
                display: "flex",
                "justify-content": "center",
                "align-items": "center",
            },
        ],
        [
            /^wh-(\d+(%|px))$/, // 匹配 wh-数字百分比 或 wh-数字像素值 的规则
            ([, value]) => ({
                width: value,
                height: value,
            }),
        ],
    ],
});
